
package com.productmodule.bean;

import java.util.Hashtable;

import com.companymodule.bean.TbCompany;
import com.companymodule.dao.TbCompanyDAO;
import com.creditratingmodule.bean.TbCreditRating;
import com.creditratingmodule.dao.TbCreditRatingDAO;
import com.productmodule.dao.TbInterfaceDAO;
import com.productmodule.dao.TbProductDAO;
import com.productmodule.dao.TbProductUnitDAO;
import com.usersmodule.bean.TbUsers;
import com.usersmodule.dao.TbUsersDAO;

public class TbProductPrice implements java.io.Serializable {

    private int companyProductMiddleId;

    private int companyId;
    private TbCompany tbcompany;
    
    private int productId;
    private TbProduct tbProduct;

    private int productUnitId;
    private TbProductUnit tbProductUnit;

    private int interfaceId;
    private TbInterface tbInterface;

    private String productPirce;
    private String productDate;

    private int creditRatingId;
    private TbCreditRating tbCreaditRating;

    private int userId;
    private TbUsers tbUser;

    private String createTime;
    
    private Hashtable<String,String> ht;

    

  
	public int getCompanyProductMiddleId() {
		return companyProductMiddleId;
	}
	public void setCompanyProductMiddleId(int companyProductMiddleId) {
		this.companyProductMiddleId = companyProductMiddleId;
	}
	public int getCompanyId() {
		return companyId;
	}
	public void setCompanyId(int companyId) {
		this.companyId = companyId;
		this.tbcompany = new TbCompanyDAO().getTbCompanyByCompanyId(companyId);
	}
	public TbCompany getTbcompany() {
		return tbcompany;
	}
	public void setTbcompany(TbCompany tbcompany) {
		this.tbcompany = tbcompany;
	}
	public int getProductId() {
		return productId;
	}
	public void setProductId(int productId) {
		this.productId = productId;
		this.tbProduct = new TbProductDAO().getTbProductByProductId(productId);
	}
	public TbProduct getTbProduct() {
		return tbProduct;
	}
	public void setTbProduct(TbProduct tbProduct) {
		this.tbProduct = tbProduct;
	}
	public int getProductUnitId() {
		return productUnitId;
	}
	public void setProductUnitId(int productUnitId) {
		this.productUnitId = productUnitId;
		this.tbProductUnit = new TbProductUnitDAO().getTbProductUnitByProductUnitId(productUnitId);
	}
	public TbProductUnit getTbProductUnit() {
		return tbProductUnit;
	}
	public void setTbProductUnit(TbProductUnit tbProductUnit) {
		this.tbProductUnit = tbProductUnit;
	}
	public int getInterfaceId() {
		return interfaceId;
	}
	public void setInterfaceId(int interfaceId) {
		this.interfaceId = interfaceId;
		this.tbInterface = new TbInterfaceDAO().getTbInterfaceByInterfaceId(interfaceId);
	}
	public TbInterface getTbInterface() {
		return tbInterface;
	}
	public void setTbInterface(TbInterface tbInterface) {
		this.tbInterface = tbInterface;
	}
	public String getProductPirce() {
		return productPirce;
	}
	public void setProductPirce(String productPirce) {
		this.productPirce = productPirce;
	}
	public int getCreditRatingId() {
		return creditRatingId;
	}
	public void setCreditRatingId(int creditRatingId) {
		this.creditRatingId = creditRatingId;
		this.tbCreaditRating = new TbCreditRatingDAO().getTbCreditRatingByCreditRatingId(creditRatingId);
	}
	public TbCreditRating getTbCreaditRating() {
		return tbCreaditRating;
	}
	public void setTbCreaditRating(TbCreditRating tbCreaditRating) {
		this.tbCreaditRating = tbCreaditRating;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
		this.tbUser = new TbUsersDAO().getTbUsersByUserId(userId);
	}
	public TbUsers getTbUser() {
		return tbUser;
	}
	public void setTbUser(TbUsers tbUser) {
		this.tbUser = tbUser;
	}
	public String getCreateTime() {
		return createTime;
	}
	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}
	public String getProductDate() {
		return productDate;
	}
	public void setProductDate(String productDate) {
		this.productDate = productDate;
	}
	  public Hashtable<String, String> getHt() {
		return ht;
	}
	public void setHt(Hashtable<String, String> ht) {
		this.ht = ht;
	}
	public TbProductPrice(){
	}
	 public TbProductPrice(int companyId,int productId,int productUnitId,int interfaceId,String productPirce,int creditRatingId,int userId){
	        this.companyId = companyId;
	        this.productId = productId;
	        this.productUnitId = productUnitId;
	        this.interfaceId = interfaceId;
	        this.productPirce = productPirce;
	        this.creditRatingId = creditRatingId;
	        this.userId = userId;
	       
	    }
	    public TbProductPrice(int companyProductMiddleId,int companyId,int productId,int productUnitId,int interfaceId,String productPirce,int creditRatingId,int userId){
	        this.companyProductMiddleId = companyProductMiddleId;
	        this.companyId = companyId;
	        this.productId = productId;
	        this.productUnitId = productUnitId;
	        this.interfaceId = interfaceId;
	        this.productPirce = productPirce;
	        this.creditRatingId = creditRatingId;
	        this.userId = userId;
	    }
	    /**
	     * 
	     * @param companyId
	     * @param productId
	     * @param productUnitId
	     * @param productPirce
	     * @param creditRatingId
	     * @param userId
	     * @param interfaces
	     * @param productDate
	     */
	    public TbProductPrice(int companyId,int productId,int productUnitId,int interfaceId,String productPirce,int userId,String productDate,Hashtable<String ,String> ht){
	        this.companyId = companyId;
	        this.productId = productId;
	        this.productUnitId = productUnitId;
	        this.interfaceId = interfaceId;
	        this.productPirce = productPirce;
	        this.userId = userId;
	        this.productDate = productDate;
	        this.ht = ht;
	    }
	    public TbProductPrice(int productPriceId,int companyId,int productId,int productUnitId,int interfaceId,String productPirce,int userId,String productDate){
	    	this.companyProductMiddleId = productPriceId;
	    	this.companyId = companyId;
	    	this.productId = productId;
	    	this.productUnitId = productUnitId;
	    	this.interfaceId = interfaceId;
	    	this.productPirce = productPirce;
	    	this.userId = userId;
	    	this.productDate = productDate;
	    }
	    public TbProductPrice(int productId,String productDate){
	    	this.productId = productId;
	    	this.productDate = productDate;
	    }
	   
}

